<html>
<head><meta charset="utf-8"><title>rustup perf hit · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html">rustup perf hit</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227537090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227537090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227537090">(Feb 24 2021 at 02:08)</a>:</h4>
<p>Rustup adds a pretty large performance penalty for cargo's testsuite.  On my systems, it is 1.4 to 1.8 times faster to run without it.  I'm wondering if it would make sense to detect the presence of rustup, and force the <code>PATH</code> to circumvent it.</p>



<a name="227537116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227537116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227537116">(Feb 24 2021 at 02:09)</a>:</h4>
<p>rustup improved their startup time recently, but I don't think there's been a release since</p>



<a name="227537169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227537169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227537169">(Feb 24 2021 at 02:09)</a>:</h4>
<p>oh it didn't actually get merged yet :( <a href="https://github.com/rust-lang/rustup/pull/2627">https://github.com/rust-lang/rustup/pull/2627</a></p>



<a name="227537556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227537556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227537556">(Feb 24 2021 at 02:14)</a>:</h4>
<p>Hmm.  Interesting, thanks!   I would think that with <code>RUSTUP_TOOLCHAIN</code> set, there should be almost no work for the wrapper to do (like, I wouldn't expect it to load any files or do anything except launch the process).  But I don't know rustup well enough to say.</p>



<a name="227541696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227541696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227541696">(Feb 24 2021 at 03:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="223910">Daniel Silverstone</span> has a comment here about why it's slow currently: <a href="https://github.com/rust-lang/rustup/issues/2626#issuecomment-753380909">https://github.com/rust-lang/rustup/issues/2626#issuecomment-753380909</a></p>



<a name="227557764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227557764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227557764">(Feb 24 2021 at 07:17)</a>:</h4>
<p>Just posted a comment about that as well. I think, in theory, a rustup-enabled cargo could determine the toolchain and then set <code>RUSTC</code> to point to the rustc binary of that toolchain (assuming <code>RUSTC</code> isn't already set), so that each invocation of rustc doesn't have to re-determine the toolchain and re-parse the manifest.</p>



<a name="227559637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/rustup%20perf%20hit/near/227559637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/rustup.20perf.20hit.html#227559637">(Feb 24 2021 at 07:40)</a>:</h4>
<p>I just <a href="https://github.com/rust-lang/rustup/issues/2626#issuecomment-784864794">tested this</a>, and it seems like a worthwhile optimization. Shaved 6 seconds off of a 70s build.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>